package com.example.startapp.entity;

public class Purchase {

    private Integer purchaseId;

    private Commodity commodity;

    private User user;

    private Integer quantity;

    private Shop shop;


    // Constructors
    public Purchase() {
        this.purchaseId = purchaseId;
        this.commodity = commodity;
        this.user = user;
        this.quantity = quantity;
        this.shop=shop;
    }

    public Purchase(Integer purchaseId, Commodity commodity, User user, Integer quantity,Shop shop) {
        this.purchaseId = purchaseId;
        this.commodity = commodity;
        this.user = user;
        this.quantity = quantity;
        this.shop=shop;
    }

    // Getters and Setters
    public Integer getPurchaseId() {
        return purchaseId;
    }

    public void setPurchaseId(Integer purchaseId) {
        this.purchaseId = purchaseId;
    }

    public Commodity getCommodity() {
        return commodity;
    }

    public void setCommodity(Commodity commodity) {
        this.commodity = commodity;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public Shop getShop() {
        return shop;
    }

    public void setShop(Shop shop) {
        this.shop = shop;
    }

    // Other methods such as toString, equals, and hashCode can be added if needed
}

